Background

An article from FiveThirtyEighty shows that there is more than 33,000 people that are fatally shot in the USA. The article shows that alomst two-thirds of gun deaths are related to swicide.About 85 percent of suicide victims are male aged 45 or older. More than half of homicide victims are blacks men aged between 15 and 34.

data <- read.csv("C:\\Users\\exoni\\OneDrive\\myrepo\\full_data.csv")
dat <- subset(data,sex=="M"&age!="NA"&age>=15&intent!="NA")
da <- subset(data,sex=="F")

The plot below shows that young black men aged between 15 and 34 are more likely to be victims of homicide. It also shows that white men aged 35 or older are more likely to be victims of suicides.

la <- datt %>% group_by(month,intent,year,race,hispanic,group,sex) %>% summarise(sum=sum(month),n(),na.rm=TRUE)
## `summarise()` regrouping output by 'month', 'intent', 'year', 'race', 'hispanic', 'group' (override with `.groups` argument)
k<-la %>% ggplot(aes(sum,as.factor(month)))+geom_point(aes(color=intent))+facet_wrap(~race+group,nrow=5)+labs(x="sum of gun of gun deaths",y="months",title="Gun Deaths Among Men between 2012 and 2014 in the USA")
ggplotly(k,tooltip = c("sum","intent","year"))
## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
ggsave("men.png")
## Saving 7 x 5 in image
da <- subset(data,sex=="F")

The plot below shows that black women aged 15 and older are more likely to be victims of homicides. It also shows that white women aged 15 or older are more likely to be victims of suicide.

la <- datt %>% group_by(month,intent,year,race,hispanic,group,sex) %>% summarise(sum=sum(month),n(),na.rm=TRUE)
## `summarise()` regrouping output by 'month', 'intent', 'year', 'race', 'hispanic', 'group' (override with `.groups` argument)
k<-la %>% ggplot(aes(sum,as.factor(month)))+geom_point(aes(color=intent))+facet_wrap(~race+group,nrow=5)+labs(x="Sum of gun deaths",y="months",title="Gun Deaths Among Women between 2012 and 2014 in the USA")+theme_bw()
ggplotly(k,tooltip = c("sum","intent","year"))
ggsave("women.png")
## Saving 7 x 5 in image

Conclusion

The client should make commercials that target young black men, white adult men, black women, and white women. It seems like the number are higher towards the end of the year. So, it would be important to make messages during the months of October, November, and December.